import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

// import YangLeGeYang_GameManager from "../../SubGame/YangLeGeYang/Script/Manager/YangLeGeYang_GameManager";

@ccclass('RebornPanel')
export default class RebornPanel extends Component {
    public static Instance: RebornPanel;
    @property(Node)
    public Button_ok: Node | null = null;
    @property(Node)
    public Button_cancel: Node | null = null;
    onLoad() {
        RebornPanel.Instance = this;
    }
    ShowOn() {
        // this.node.active = true;
        // this.AddListener();
        // this.Refresh();
    }
    ShowOff() {
        // this.node.active = false;
        // this.RemoveListener();
    }
    Refresh() {

    }
    AddListener() {
        this.Button_ok.on(Node.EventType.TOUCH_END, this.On_Button_ok, this);
        this.Button_cancel.on(Node.EventType.TOUCH_END, this.On_Button_cancel, this);
    }
    RemoveListener() {
        this.Button_ok.off(Node.EventType.TOUCH_END, this.On_Button_ok, this);
        this.Button_cancel.off(Node.EventType.TOUCH_END, this.On_Button_cancel, this);
    }
    On_Button_ok() {
        //        // AudioManager.Play_sound("click", false, 1);
        // this.ShowOff();
        // YangLeGeYang_GameManager.Instance.Reborn();
    }
    On_Button_cancel() {
        //        // AudioManager.Play_sound("click", false, 1);
        // this.ShowOff();
        // YangLeGeYang_GameManager.Instance.GameFail();
    }
}